
import config from './config';
import request from './request';

export function GetFullUrl(imgName,width,height){
    if(!imgName){return imgName;}
    return config.PicHost+"/"+imgName+('?imageView2/1/w/'+width+'/h/'+height);
}

export function GetPrivateUrl(imgName,width,height,token){
    var options={
        imgName,
        width,
        height,
        token
    }
    return request({
        url: '/Common/GetPrivateImgToken',
        method: 'get',
        params:options
      });
}

/**
 * 获取私密图片 只加前缀
 * @param {*} imgName 
 */
export function GetPrivateUrlOnlyPre(imgName){
    if(!imgName){return imgName;}
    return config.PicHost+"/"+imgName;
}



